<?php
$myApp = new Application();
//SETUP LEVEL JIKA: dalam sebuah sub modul memiliki karakteristik level yang berbeda dari umumnya
$myApp->SetLevelAccess(true);

$mData = new DBQueryParse();
$mOutput = new ListTemplate($mData, $myApp->GetCurrentUrl());

$mOutput->SetTitle("DAFTAR PEGAWAI");

$mData->SetTableName("view_hrs_pegawai");

$mData->CreateField();
$mData->SetFieldDB('id_person');

$mData->CreateField();
$mData->SetFieldDB('nip');
$mData->SetFieldHeader('NIP/NIK');

$mData->CreateField();
$mData->SetFieldDB('nama_lengkap');
$mData->SetFieldHeader('Nama');

$mData->CreateField();
$mData->SetFieldDB('COALESCE(nama_jabatan, "-")');
$mData->SetFieldHeader('Jabatan');

$mData->CreateField();
$mData->SetFieldDB('kelamin');
$mData->SetFieldHeader('Jenis Kelamin');

$mData->CreateField();
$mData->SetFieldDB('goldarah');
$mData->SetFieldHeader('Gol. Darah');



//FIELD LIST FORMAT SETTING
$mOutput->SetSearchableList(true);
////


//FIELD VALIDITAS
/* EMPTY */
////


//FIELD HIDDEN
$mOutput->SetFieldHidden(0);
/* EMPTY */
////


//SET FIELD STATUS
$tStatus[0]['Caption']= "Non Aktif"; $tStatus[0]['Caption']= "Non Aktif";
$tStatus[1]['Caption']= "Aktif";$tStatus[1]['Class']= "Active";
$mOutput->SetStatus($tStatus);
////


//OUTPUT SETTING
$mOutput->SetFieldAlign("center", 1);
$mOutput->SetFieldAlign("center", 3);
$mOutput->SetFieldAlign("center", 4);
$mOutput->SetFieldAlign("center", 5);
////


//ACTION SETTING  
$mOutput->SetAddActionCaption("Tambah Pegawai");

//ADDITIONAL DATA TRF
/* EMPTY */

//AUTH
$mOutput->SetAddActionAuth(true);
$mOutput->SetEditActionAuth(true);
$mOutput->SetDeleteActionAuth(true);
$mOutput->SetUnlockActionAuth(false);
$mOutput->SetResetActionAuth(false);
//TARGET
$mOutput->SetAddActionTarget("main.php?menu=12&submenu=312");
$mOutput->SetEditActionTarget("main.php?menu=12&submenu=312");
$mOutput->SetDeleteActionTarget("main.php?menu=12&submenu=319");
$mOutput->PrintList();
?>
 